package com.powernode.excp;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExcepHandle {
    @ExceptionHandler(PowerBusinessException.class)
    public AjaxResult peHandle(PowerBusinessException powerBusinessException){
        return AjaxResult.getInstance().setCode(500).setSuccess(false).setMessage(powerBusinessException.getMessage());
    }
}
